<?php

include _ITSTOCK_INCLUDE_DIR_.'html_search.inc.php';
include _ITSTOCK_INCLUDE_DIR_.'html_navigation.inc.php';
include _ITSTOCK_INCLUDE_DIR_.'html_links.inc.php';
include _ITSTOCK_INCLUDE_DIR_.'html_table_list.inc.php';
include _ITSTOCK_INCLUDE_DIR_.'settings_html.inc.php';

itstock_structure($structure, 'cpu');
$structure = itstock_html_search_init('cpu');
$structure['table_headers'] = array('Building', 'Department', 'Floor', 'Spot', 'Name', 'Case Label','');
$structure['table_indexes'] = array('building', 'department', 'floor', 'spot', 'location', 'cpu');
$structure['table_actions'] = array(
  '<img onclick="itstock_set_location(this, \'%s\', \'cpu\')" title="Select Computer Case" src="img/ok.png">',
);
$structure['table_error'] = 'No computer case have been found.';
$structure['ajax_nav'] = 'itstock_locations(\'cpus\', this, %s, true)';

echo '<b><label>Computer Cases</label>';
echo '</b><br><br><span style="float:right;">';
itstock_html_search('cpus', true);
echo '</span><div style="position:absolute; bottom: 20px; top: 100px; left: 10px; right: 10px;overflow-y:auto;">';
echo '<table>';
itstock_html_table_list_data($structure, false, true, false);
echo '</table></div>';
?>
